/*     */ package org.jeecgframework.p3.cg.def;
/*     */ 
/*     */ import java.util.ResourceBundle;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class CodeResourceUtil
/*     */ {
/*  13 */   private static final ResourceBundle bundle = ResourceBundle.getBundle("db");
/*  14 */   private static final ResourceBundle bundlePath = ResourceBundle.getBundle("p3-cg-config");
/*     */   
/*     */ 
/*     */ 
/*  18 */   public static String DIVER_NAME = "com.mysql.jdbc.Driver";
/*     */   
/*  20 */   public static String URL = "jdbc:mysql://localhost:3306/database?useUnicode=true&characterEncoding=UTF-8&zeroDateTimeBehavior=convertToNull";
/*     */   
/*  22 */   public static String USERNAME = "root";
/*     */   
/*  24 */   public static String PASSWORD = "123456";
/*     */   
/*  26 */   public static String DATABASE_NAME = "databasename";
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*  31 */   public static String DATABASE_TYPE = "mysql";
/*  32 */   public static String DATABASE_TYPE_MYSQL = "mysql";
/*  33 */   public static String DATABASE_TYPE_ORACLE = "oracle";
/*     */   
/*     */ 
/*  36 */   public static String JEECG_UI_FIELD_REQUIRED_NUM = "4";
/*     */   
/*  38 */   public static String UI_FIELD_SEARCH_NUM = "3";
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*  48 */   public static String source_root_package = "src";
/*     */   
/*  50 */   public static String bussiPackage = "sun";
/*  51 */   public static String bussiPackageUrl = "sun";
/*     */   
/*  53 */   public static String entity_package = "entity";
/*     */   
/*  55 */   public static String page_package = "page";
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   static
/*     */   {
/*  83 */     DIVER_NAME = getDIVER_NAME();
/*  84 */     URL = getURL();
/*  85 */     USERNAME = getUSERNAME();
/*  86 */     PASSWORD = getPASSWORD();
/*  87 */     DATABASE_NAME = getDATABASE_NAME();
/*     */     
/*  89 */     SYSTEM_ENCODING = getSYSTEM_ENCODING();
/*  90 */     TEMPLATEPATH = getTEMPLATEPATH();
/*  91 */     source_root_package = getSourceRootPackage();
/*  92 */     bussiPackage = getBussiPackage();
/*  93 */     bussiPackageUrl = bussiPackage.replace(".", "/");
/*     */     
/*     */ 
/*     */ 
/*     */ 
/*  98 */     GENERATE_TABLE_ID = getGenerate_table_id();
/*     */     
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/* 105 */     UI_FIELD_SEARCH_NUM = getUi_search_filed_num();
/*     */     
/*     */ 
/*     */ 
/*     */ 
/* 110 */     if ((URL.indexOf("mysql") >= 0) || (URL.indexOf("MYSQL") >= 0)) {
/* 111 */       DATABASE_TYPE = DATABASE_TYPE_MYSQL;
/* 112 */     } else if ((URL.indexOf("oracle") >= 0) || (URL.indexOf("ORACLE") >= 0)) {
/* 113 */       DATABASE_TYPE = DATABASE_TYPE_ORACLE;
/*     */     }
/*     */     
/*     */ 
/*     */ 
/* 118 */     source_root_package = source_root_package.replace(".", "/"); }
/* 119 */   //public static String web_root_package = web_root_package.replace(".", "/");
/*     */   
/*     */ 
/* 122 */   public static String ENTITY_URL = source_root_package + "/" + bussiPackageUrl + "/" + entity_package + "/";
/*     */   
/* 124 */   public static String PAGE_URL = source_root_package + "/" + bussiPackageUrl + "/" + page_package + "/";
/*     */   
/* 126 */   public static String ENTITY_URL_INX = bussiPackage + "." + entity_package + ".";
/*     */   
/* 128 */   public static String PAGE_URL_INX = bussiPackage + "." + page_package + ".";
/*     */   
/* 130 */   public static String CODEPATH = source_root_package + "/" + bussiPackageUrl + "/";
/*     */   
/* 132 */  // public static String JSPPATH = web_root_package + "/" + bussiPackageUrl + "/";
/*     */   
/*     */   public static String TEMPLATEPATH;
/*     */   
/*     */   public static String GENERATE_TABLE_ID;
/*     */   
/*     */   public static String JEECG_GENERATE_UI_FILTER_FIELDS;
/*     */   
/*     */   public static String SYSTEM_ENCODING;
/*     */   
/*     */ 
/*     */   private void ResourceUtil() {}
/*     */   
/*     */ 
/*     */   public static final String getDIVER_NAME()
/*     */   {
/* 148 */     String databaseName = bundlePath.getString("database");
/* 149 */     return bundle.getString(databaseName + "." + "driverClassName");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getURL()
/*     */   {
/* 158 */     String databaseName = bundlePath.getString("database");
/* 159 */     return bundle.getString(databaseName + "." + "url");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getUSERNAME()
/*     */   {
/* 168 */     String databaseName = bundlePath.getString("database");
/* 169 */     return bundle.getString(databaseName + "." + "username");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getPASSWORD()
/*     */   {
/* 178 */     String databaseName = bundlePath.getString("database");
/* 179 */     return bundle.getString(databaseName + "." + "password");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getDATABASE_NAME()
/*     */   {
/* 188 */     String databaseName = bundlePath.getString("database");
/* 189 */     return bundle.getString(databaseName + "." + "database_name");
/*     */   }
/*     */   
/*     */   private static String getBussiPackage() {
/* 193 */     return bundlePath.getString("bussi_package");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getEntityPackage()
/*     */   {
/* 202 */     return bundlePath.getString("entity_package");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getPagePackage()
/*     */   {
/* 210 */     return bundlePath.getString("page_package");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getTEMPLATEPATH()
/*     */   {
/* 227 */     return bundlePath.getString("templatepath_ftl");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getSourceRootPackage()
/*     */   {
/* 237 */     return bundlePath.getString("source_root_package");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getSYSTEM_ENCODING()
/*     */   {
/* 246 */     return bundlePath.getString("system_encoding");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getGenerate_table_id()
/*     */   {
/* 254 */     return bundlePath.getString("generate_table_id");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getGenerate_ui_filter_fields()
/*     */   {
/* 262 */     return bundlePath.getString("generate_ui_filter_fields");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getUi_search_filed_num()
/*     */   {
/* 270 */     return bundlePath.getString("ui_search_filed_num");
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   public static final String getUi_field_required_num()
/*     */   {
/* 278 */     return bundlePath.getString("ui_field_required_num");
/*     */   }
/*     */   
/*     */   public static final String getConfigInfo(String key)
/*     */   {
/* 283 */     return bundlePath.getString(key);
/*     */   }
/*     */ }


/* Location:              /Users/guo/.m2/repository/org/jeewxframework/P3-Codegenerate/2.0.1/P3-Codegenerate-2.0.1.jar!/org/jeecgframework/p3/cg/def/CodeResourceUtil.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */